%        File: paper.tex
%     Created: Sat May 31 08:00 PM 2008 P
% Last Change: Sat May 31 08:00 PM 2008 P
%
\documentclass[titlepage,12pt]{article}
\usepackage{microtype}
\usepackage{ctable}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[urlcolor=blue,pdftex,linkcolor=black,citecolor=black,
   colorlinks=true,plainpages=false]{hyperref}


\pagestyle{headings}
\title{CSC465 : Lab 6}
\author{Daniel Drexler \and Robert A. Iannucci Jr.}
\date{\today}


\begin{document}
   \maketitle
   \clearpage

   \section{Observations}
   \begin{itemize}
      \item[B8)] The results were fairly close to what we expected.
   One client would usually get a leg up on the other client and
   complete its transfer first. The overall bandwidth utilization was
   close to, but not exactly, ten megabits  the speed of the hub.
      \item[B9)] One client would gain an advantage by starting earlier and
   then dominating the shared link between the clients and the server.
   However, the slower transfer is only 10-20 seconds slower  10\% of
   the total time.
      \item[C3)] RED was more fair  the transfers completed closer to one
   another. However, the total goodput was lower overall. If fairness
   is more important than overall link utilization, use RED.
      \item[D3)] WFQ is even more fair than RED. The difference in goodput
   between clients was less than one tenth of a megabit. However, the
   overall bandwidth utilization on the 10 megabit link dropped to
   around 7.3 megabits as compared to 8 with RED and ~8.3 using FIFO.
      \item[D4)] Fair queuing can be set to use an aggregate limit, where each
   client is given an given share of the link or an individual limit,
   where queuing is handled at the per-flow level.
      \item[E3)] The combination of WFQ and RED drops the link utilization an
   additional 0.1 megabit on average, but also lowers the difference
   between clients to 0.03 or 0.02 hundredths of a megabit. This is
   as close to a completely fair system as we got, but also wastes the
   most cable capacity, overall.
   \end{itemize}

   \section{Commands Used}
   \begin{itemize}
      \item[RED] To turn RED on or off, you use: 
\begin{verbatim}
enable 
config term
interface <interface name> 
[no] random-detect 
end
\end{verbatim}
      \item[WFQ] To turn WFQ on or off, you use:
\begin{verbatim}
enable 
config term 
interface <interface name> 
[no] fair-queuing
end
\end{verbatim}
      \item[WFQ+RED] To enable both WFQ and RED at the same time,
      you have to use a policy map:
\begin{verbatim}
enable 
config term 
policy-map def 
class class-default
random-detect 
fair-queuing 
end 
enable 
config term 
config <interface name>
policy-map def exit
\end{verbatim}
   \end{itemize}

   \pagebreak
   \section{Data}
   \begin{table}[ht!]
      \centering
      \begin{tabular}{| l | l | c | c | c | c | }
         \hline
                    &           &  Client 1 & Client 1 & Client 2 &  Client 2  \\
         Experiment & Queuing   &  Time     & Goodput  &   Time   &  Goodput   \\ \hline
         b0         & FIFO      & 199.4     & 4.04     &   189.6  & 4.25       \\ \hline
         b1         & FIFO      & 182.3     & 4.42     &   200.4  & 4.02       \\ \hline
         b2         & FIFO      & 199.9     & 4.03     &   195    & 4.13       \\ \hline
         b3         & FIFO      & 179.1     & 4.5      &   200.1  & 4.02       \\ \hline
         b4         & FIFO      & 198.6     & 4.06     &   190    & 4.24       \\ \hline
         c0         & RED       & 199       & 4.05     &   201.5  & 4          \\ \hline
         c1         & RED       & 202.4     & 3.98     &   190.7  & 4.22       \\ \hline
         c2         & RED       & 200.5     & 4.02     &   200.8  & 4.01       \\ \hline
         c3         & RED       & 202.7     & 3.97     &   195.2  & 4.13       \\ \hline
         c4         & RED       & 179.1     & 4.5      &   202.7  & 3.97       \\ \hline
         d0         & WFQ       & 224.4     & 3.59     &   225.2  & 3.58       \\ \hline
         d1         & WFQ       & 223.3     & 3.61     &   226.6  & 3.55       \\ \hline
         d2         & WFQ       & 225.9     & 3.57     &   222.3  & 3.62       \\ \hline
         d3         & WFQ       & 225.6     & 3.57     &   222.2  & 3.62       \\ \hline
         d4         & WFQ       & 227.9     & 3.53     &   226.2  & 3.56       \\ \hline
         e0         & WFQ + RED & 219.8     & 3.66     &   218.9  & 3.68       \\ \hline
         e1         & WFQ + RED & 221.8     & 3.63     &   222.4  & 3.62       \\ \hline
         e2         & WFQ + RED & 221.9     & 3.63     &   219.9  & 3.66       \\ \hline
         e3         & WFQ + RED & 222.3     & 3.62     &   221.2  & 3.64       \\ \hline
         e4         & WFQ + RED & 221.9     & 3.63     &   221.7  & 3.63       \\ \hline
      \end{tabular}
      \caption{Timing and Goodput}
   \end{table}


   \begin{table}[ht!]
      \centering
      \begin{tabular}{| l | r | r | r | r | r | }
         \hline
                    & Segments & Bad Segments &    Segments &    Segments    \\
             Server & Received & Received &        Sent &        Rerransmitted \\     \hline
            Initial &    1641 & 0 &    1641 & 0\\ \hline
            b0      &  168084 & 0 &   89321 & 0\\ \hline
            b1      &  307159 & 0 &  162712 & 0\\ \hline
            b2      &  446254 & 0 &  236310 & 0\\ \hline
            b3      &  585312 & 0 &  309680 & 0\\ \hline
            b4      &  724362 & 0 &  383582 & 0\\ \hline
            c0      &  863527 & 0 &  457933 & 0\\ \hline
            c1      & 1003262 & 0 &  533068 & 0\\ \hline
            c2      & 1142958 & 0 &  608553 & 0\\ \hline
            c3      & 1282396 & 0 &  683670 & 0\\ \hline
            c4      & 1422377 & 0 &  759279 & 0\\ \hline
            d0      & 1561425 & 0 &  833938 & 0\\ \hline
            d1      & 1700486 & 0 &  909497 & 0\\ \hline
            d2      & 1839543 & 0 &  984436 & 0\\ \hline
            d3      & 1978596 & 0 & 1059345 & 0\\ \hline
            d4      & 2117669 & 0 & 1134720 & 0\\ \hline
            e0      & 2256751 & 0 & 1218773 & 0\\ \hline
            e1      & 2395873 & 0 & 1303267 & 0\\ \hline
            e2      & 2534923 & 0 & 1386901 & 0\\ \hline
            e3      & 2674027 & 0 & 1472136 & 0\\ \hline
            e4      & 2813159 & 0 & 1557805 & 0\\ \hline
      \end{tabular}
      \caption{Server Segment Statistics}
   \end{table}


   \begin{table}[ht!]
      \centering
      \begin{tabular}{| l | r | r | r | r | }
         \hline
        & Segments &        Bad Segments &      &        Segments\\ 
Client  1 &        Received &   Received &      Segments Sent     & Retransmitted\\ \hline
Initial & 1745     &        0   &        1745   &        0\\ \hline
b0      & 46670    &        0   &        9264   &        518\\ \hline
b1      & 83232    &        0   &        15638  &        939\\ \hline
b2      & 120343   &        0   &        23120  &        1371\\ \hline
b3      & 157152   &        0   &        30127  &        1802\\ \hline
b4      & 194094   &        0   &        36842  &        2249\\ \hline
c0      & 231072   &        0   &        43860  &        2387\\ \hline
c1      & 269349   &        0   &        50638  &        3146\\ \hline
c2      & 307323   &        0   &        57644  &        3714\\ \hline
c3      & 345241   &        0   &        64895  &        4121\\ \hline
c4      & 383177   &        0   &        71233  &        4905\\ \hline
d0      & 420344   &        0   &        81427  &        5314\\ \hline
d1      & 458022   &        0   &        92500  &        5931\\ \hline
d2      & 495664   &        0   &        103443 &        6519\\ \hline
d3      & 533474   &        0   &        114977 &        7016\\ \hline
d4      & 571334   &        0   &        126343 &        7665\\ \hline
e0      & 613427   &        0   &        143925 &        8222\\ \hline
e1      & 655895   &        0   &        161661 &        8788\\ \hline
e2      & 697865   &        0   &        179192 &        9295\\ \hline
e3      & 740401   &        0   &        197454 &        9913\\ \hline
e4      & 783047   &        0   &        215755 &        10516\\ \hline
      \end{tabular}
      \caption{Client 1 Segment Statistics}
   \end{table}


   \begin{table}[ht!]
      \centering
      \begin{tabular}{| l | r | r | r | r | }
      \hline
         & Segments & Bad Segments &               &\\ 
Client 2 & Received &  Received    & Segments Sent & Segments Retransmitted\\ \hline
Initial & 1773 & 0 & 1773 & 0\\ \hline
b0 & 44223 & 0 & 9048 & 462\\ \hline
b1 & 80809 & 0 & 15322 & 925\\ \hline
b2 & 117048 & 0 & 21227 & 1239\\ \hline
b3 & 153384 & 0 & 27118 & 1648\\ \hline
b4 & 190094 & 0 & 33753 & 2042\\ \hline
c0 & 227248 & 0 & 40202 & 2286\\ \hline
c1 & 263794 & 0 & 46353 & 2398\\ \hline
c2 & 301095 & 0 & 53573 & 2674\\ \hline
c3 & 338092 & 0 & 59721 & 2821\\ \hline
c4 & 375522 & 0 & 66167 & 3237\\ \hline
d0 & 413014 & 0 & 76689 & 3770\\ \hline
d1 & 450846 & 0 & 88105 & 4168\\ \hline
d2 & 488138 & 0 & 98468 & 4614\\ \hline
d3 & 525237 & 0 & 108563 & 4986\\ \hline
d4 & 562713 & 0 & 119340 & 5512\\ \hline
e0 & 604425 & 0 & 136117 & 6031\\ \hline
e1 & 646228 & 0 & 153297 & 6567\\ \hline
e2 & 687659 & 0 & 169762 & 7100\\ \hline
e3 & 730104 & 0 & 187867 & 7697\\ \hline
e4 & 772812 & 0 & 206252 & 8320\\ \hline
      \end{tabular}
      \caption{Client 2 Segment Statistics}
   \end{table}

\clearpage
\section{Graphs}

      \begin{figure}[ht!]
         \centering
         \includegraphics{pictures/FIFOQ}
         \caption{FIFO Queuing}
      \end{figure}


      \begin{figure}[ht!]
         \centering
         \includegraphics{pictures/RED}
         \caption{RED}
      \end{figure}


      \begin{figure}[ht!]
         \centering
         \includegraphics{pictures/WFQ}
         \caption{WFQ}
      \end{figure}


      \begin{figure}[ht!]
         \centering
         \includegraphics{pictures/WFQ+RED}
         \caption{WFQ with RED}
      \end{figure}

     \clearpage
     \section{Summary}

      \begin{figure}[ht!]
         \centering
         \includegraphics{pictures/Summary}
         \caption{WFQ with RED}
      \end{figure}

   The WFQ methods have a much lower goodput rate than FIFO or RED,
   as well as an overall higher retransmit rate. The high number of
   re-transmits are directly related to the low goodput, as the loss
   in goodput is made up of packets that must be re-sent because they
   timed out or were dropped as a result of using WFQ. RED has similar
   effects, but to a lesser degree. Compared to FIFO, it has more
   retransmits (from dropped packets do to marking), but also is much
   closer to full utilization of the link.  The one advantage that the
   WFQ methods do have, however, is consistency.  Whereas the FIFO and
   RED methods are relatively all over the map, the WFQ methods are
   extremely consistent in their repeatability.



\end{document}
